package com.oba.king.controlmanage.proxyproduct;

import java.io.Serializable;

import com.oba.base.service.BaseBo;
import com.oba.king.controlmanage.ProxyContract;
import com.oba.king.datalib.productinfo.ProductInfo;

public class ProxyProductDetails extends BaseBo {

	private ProductInfo product;
	private ProxyContract contract;
	private Double proxyUnitPrice;
	private Double balanceUnitPrice;
	private Double balanceTaxPrice;
	private Double taxRate;
	private String remark;
	private Integer amount;

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public Long getId() {
		return product.getId();
	}

	public String getName() {
		return null;
	}

	@Override
	public int hashCode() {
		int result = 31;
		result = result * 19 + (product == null ? 0 : product.hashCode());
		result = result * 19 + (contract == null ? 0 : contract.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof ProxyProductDetails)) {
			return false;
		}
		ProxyProductDetails old = (ProxyProductDetails) obj;
		if (old.product == null || old.contract == null || this.product == null || this.contract == null) {
			return false;
		} else if (old.product.getProductId() != null && old.product.getProductId() == this.product.getProductId()
				&& old.contract.getContractSequnceId() != null
				&& old.contract.getContractSequnceId() == this.contract.getContractSequnceId()) {
			return true;
		}
		return false;
	}

	public ProductInfo getProduct() {
		return product;
	}

	public void setProduct(ProductInfo product) {
		this.product = product;
	}

	public ProxyContract getContract() {
		return contract;
	}

	public void setContract(ProxyContract contract) {
		this.contract = contract;
	}

	public Double getProxyUnitPrice() {
		return proxyUnitPrice;
	}

	public void setProxyUnitPrice(Double proxyUnitPrice) {
		this.proxyUnitPrice = proxyUnitPrice;
	}

	public Double getBalanceUnitPrice() {
		return balanceUnitPrice;
	}

	public void setBalanceUnitPrice(Double balanceUnitPrice) {
		this.balanceUnitPrice = balanceUnitPrice;
	}

	public Double getBalanceTaxPrice() {
		return balanceTaxPrice;
	}

	public void setBalanceTaxPrice(Double balanceTaxPrice) {
		this.balanceTaxPrice = balanceTaxPrice;
	}

	public Double getTaxRate() {
		return taxRate;
	}

	public void setTaxRate(Double taxRate) {
		this.taxRate = taxRate;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
